<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pymunk.Arbiter</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pymunk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pymunk-module.html">Package&nbsp;pymunk</a> ::
        Class&nbsp;Arbiter
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pymunk.Arbiter-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Arbiter</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Arbiter</strong>
</pre>

<hr />
<p>Arbiters are collision pairs between shapes that are used with the
collision callbacks.</p>
<p><em>IMPORTANT:</em> Because arbiters are handled by the space you should never
hold onto a reference to an arbiter as you don't know when it will be
destroyed! Use them within the callback where they are given to you and
then forget about them or copy out the information you need from them.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pymunk.Arbiter-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">_arbiter</span>,
        <span class="summary-sig-arg">space</span>)</span><br />
      You should never need to create an Arbiter yourself, consider this
method private :)</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#contacts" class="summary-name">contacts</a><br />
      Information on the contact points between the objects.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#shapes" class="summary-name">shapes</a><br />
      Get the shapes in the order that they were defined in the collision handler associated with this arbiter
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#elasticity" class="summary-name">elasticity</a><br />
      Elasticity
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#friction" class="summary-name">friction</a><br />
      Friction
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#surface_velocity" class="summary-name">surface_velocity</a><br />
      Used for surface_v calculations, implementation may change
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#stamp" class="summary-name">stamp</a><br />
      Time stamp of the arbiter.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#swapped_coll" class="summary-name">swapped_coll</a><br />
      Are the shapes swapped in relation to the collision handler?
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="pymunk.Arbiter-class.html#is_first_contact" class="summary-name">is_first_contact</a><br />
      Returns true if this is the first step that an arbiter existed.
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">_arbiter</span>,
        <span class="sig-arg">space</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  You should never need to create an Arbiter yourself, consider this
method private :)
  <dl class="fields">
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Property Details</span></td>
</tr>
</table>
<a name="contacts"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">contacts</h3>
  Information on the contact points between the objects.
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_contacts" class="summary-sig-name" onclick="show_private();">_get_contacts</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="shapes"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">shapes</h3>
  Get the shapes in the order that they were defined in the collision handler associated with this arbiter
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_shapes" class="summary-sig-name" onclick="show_private();">_get_shapes</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="elasticity"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">elasticity</h3>
  Elasticity
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_elasticity" class="summary-sig-name" onclick="show_private();">_get_elasticity</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_set_elasticity" class="summary-sig-name" onclick="show_private();">_set_elasticity</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">elasticity</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="friction"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">friction</h3>
  Friction
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_friction" class="summary-sig-name" onclick="show_private();">_get_friction</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
    <dt>Set Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_set_elasticity" class="summary-sig-name" onclick="show_private();">_set_elasticity</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">elasticity</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="surface_velocity"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">surface_velocity</h3>
  Used for surface_v calculations, implementation may change
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_surface_velocity" class="summary-sig-name" onclick="show_private();">_get_surface_velocity</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="stamp"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">stamp</h3>
  Time stamp of the arbiter. (from the space)
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_stamp" class="summary-sig-name" onclick="show_private();">_get_stamp</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="swapped_coll"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">swapped_coll</h3>
  Are the shapes swapped in relation to the collision handler?
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_swapped_coll" class="summary-sig-name" onclick="show_private();">_get_swapped_coll</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<a name="is_first_contact"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">is_first_contact</h3>
  Returns true if this is the first step that an arbiter existed.
You can use this from preSolve and postSolve to know if a collision
between two shapes is new without needing to flag a boolean in your
begin callback.
  <dl class="fields">
    <dt>Get Method:</dt>
    <dd class="value"><span class="summary-sig"><a href="pymunk.Arbiter-class.html#_get_is_first_contact" class="summary-sig-name" onclick="show_private();">_get_is_first_contact</a>(<span class="summary-sig-arg">self</span>)</span>
    </dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pymunk-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://pymunk.googlecode.com/">pymunk API reference</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jan 05 20:00:31 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
